#ifndef IPC_H
#define IPC_H


typedef void* (*event_handler)(unsigned int signal, unsigned int sender);

struct signal
{
	unsigned int sender;
};

struct signal_queue
{
	unsigned int count;
	unsigned int next;
	struct signal signals[255];
};

event_handler ev_handlers[256];

volatile unsigned int event_num[256];

volatile struct signal_queue sig_queue[256];

//Signals
#define SIG_INT		0x01

#define SIG_ACK		0x02

#define SIG_READ	0x03
#define SIG_WRITE	0x04
#define SIG_OPEN	0x05
#define SIG_CLOSE	0x06
#define SIG_READDIR	0x07
#define SIG_FINDDIR	0x08

#define SIG_KILL	0x09
#define SIG_QUIT	0x0A

#define SIG_PFAULT	0x0B

#endif
